home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / lib / tclX6.4c / dist / RCS / Makefile,v < prev   
Encoding:
Text File  |  1992-12-03  |  5.9 KB  |  187 lines

  1. head     1.1;
  2. branch   ;
  3. access   ;
  4. symbols  ;
  5. locks    jhh:1.1; strict;
  6. comment  @# @;
  7.  
  8.  
  9. 1.1
  10. date     92.12.03.12.00.53;  author jhh;  state Exp;
  11. branches ;
  12. next     ;
  13.  
  14.  
  15. desc
  16. @@
  17.  
  18.  
  19.  
  20. 1.1
  21. log
  22. @Initial revision
  23. @
  24. text
  25. @#
  26. # Makefile --
  27. #
  28. # Makefile for Extended Tcl.  This requires Tcl 6.1 or Tcl 6.2 from Berkeley,
  29. # which should be compiled before running this makefile.  Its location is
  30. # configured below.
  31. #------------------------------------------------------------------------------
  32. # Copyright 1992 Karl Lehenbauer and Mark Diekhans.
  33. #
  34. # Permission to use, copy, modify, and distribute this software and its
  35. # documentation for any purpose and without fee is hereby granted, provided
  36. # that the above copyright notice appear in all copies.  Karl Lehenbauer and
  37. # Mark Diekhans make no representations about the suitability of this
  38. # software for any purpose.  It is provided "as is" without express or
  39. # implied warranty.
  40. #------------------------------------------------------------------------------
  41. # $Id: Makefile,v 1.1 1992/12/02 18:47:19 dglo Exp dglo $
  42. #------------------------------------------------------------------------------
  43. #
  44.  
  45. include Config.mk
  46. include config/$(TCL_CONFIG_FILE)
  47. SHELL=/bin/sh
  48.  
  49. #------------------------------------------------------------------------------
  50.  
  51. # List of files that are touched by secondary makefiles when something changes.
  52.  
  53. MADE.FILES=ucbsrc/made.tmp osSupport/made.tmp src/made.tmp
  54. TKMADE.FILES=tkucbsrc/made.tmp
  55.  
  56. CFLAGS= $(OPTIMIZE_FLAG) $(XCFLAGS) -I$(TCL_UCB_DIR) $(MEM_DEBUG_FLAGS) \
  57.         $(SYS_DEP_FLAGS)
  58.  
  59. #------------------------------------------------------------------------------
  60.  
  61. all: tcl TCLDEFAULT runtcl $(TCL_TK_SHELL)
  62.  
  63.  
  64. #------------------------------------------------------------------------------
  65. # Compile the Extended Tcl library and link the Tcl shell.
  66. #
  67.  
  68. tcl: TCLX_MAKES
  69.  
  70. TCLX_MAKES: libtcl.a
  71.     cd ucbsrc;    $(MAKE) -$(MAKEFLAGS) all
  72.     cd osSupport; $(MAKE) -$(MAKEFLAGS) all
  73.     cd tclsrc;    $(MAKE) -$(MAKEFLAGS) all
  74.     cd src;       $(MAKE) -$(MAKEFLAGS) all
  75.  
  76.  
  77. # Copy the UCB libtcl.a file from where it was built.  Force the other
  78. # Makefiles to add their .o files to the library by nuking their made.tmp file.
  79.  
  80. libtcl.a: $(TCL_UCB_DIR)/libtcl.a
  81.     cp $(TCL_UCB_DIR)/libtcl.a .
  82.     rm -f  $(MADE.FILES)
  83.  
  84. #------------------------------------------------------------------------------
  85. # Generate a libtk.a with extensions and a wish shell with Extended Tcl
  86. # commands.
  87. #
  88.  
  89. $(TCL_TK_SHELL): TKX_MAKES runwish
  90.  
  91. TKX_MAKES: libtk.a
  92.     cd tkucbsrc; $(MAKE) -$(MAKEFLAGS) all
  93.     cd tksrc;    $(MAKE) -$(MAKEFLAGS) all
  94.  
  95.  
  96. # Copy the UCB libtk.a file.  Force the other Makefiles to add their
  97. # .o files to the library by nuking their made.tmp file.
  98.  
  99. libtk.a: $(TCL_TK_DIR)/libtk.a
  100.     cp $(TCL_TK_DIR)/libtk.a libtk.a
  101.     rm -f $(TKMADE.FILES)
  102.  
  103.  
  104. #------------------------------------------------------------------------------
  105. # Generate a temporary TCLDEFAULT file so Tcl can be run in this directory.
  106. # Also generate a script to point the TCLDEFAULT environment variable
  107. # at this file for testing Tcl before its installed.
  108.  
  109. TCLDEFAULT:
  110.     @@echo "    -       Generating temporary TCLDEFAULT file.     -"
  111.     @@echo "    - Use runtcl script to test Tcl before installing -"
  112.     @@echo "    - Use runwish script to test Tk before installing -"
  113.     @@echo '# Temporary TCLDEFAULT file for debugging'  >TCLDEFAULT
  114.     @@echo "set TCLPATH `pwd`/tcllib"                  >>TCLDEFAULT
  115.     @@echo "set TCLINIT `pwd`/tcllib/TclInit.tcl"      >>TCLDEFAULT
  116.  
  117. runtcl:
  118.     @@echo ':'                                              >runtcl
  119.     @@echo '# script for testing Tcl before installation'  >>runtcl
  120.     @@echo "TCLDEFAULT=`pwd`/TCLDEFAULT"                   >>runtcl
  121.     @@echo "export TCLDEFAULT"                             >>runtcl
  122.     @@echo "if [ \$$# = 0 ]"                               >>runtcl
  123.     @@echo "then"                                          >>runtcl
  124.     @@echo "    exec `pwd`/tcl"                            >>runtcl
  125.     @@echo "else"                                          >>runtcl
  126.     @@echo "    exec `pwd`/tcl \"\$$@@\""                   >>runtcl
  127.     @@echo "fi"                                            >>runtcl
  128.     chmod a+rx runtcl
  129.  
  130. runwish:
  131.     @@echo ':'                                              >runwish
  132.     @@echo '# script for testing wish before installation' >>runwish
  133.     @@echo "TCLDEFAULT=`pwd`/TCLDEFAULT"                   >>runwish
  134.     @@echo "export TCLDEFAULT"                             >>runwish
  135.     @@echo "if [ \$$# = 0 ]"                               >>runwish
  136.     @@echo "then"                                          >>runwish
  137.     @@echo "    exec `pwd`/"$(TCL_TK_SHELL)                >>runwish
  138.     @@echo "else"                                          >>runwish
  139.     @@echo "    exec `pwd`/"$(TCL_TK_SHELL)" \"\$$@@\""     >>runwish
  140.     @@echo "fi"                                            >>runwish
  141.     chmod a+rx runwish
  142.  
  143. #------------------------------------------------------------------------------
  144. #
  145. #  just test to see if the C++ include file compiles and links
  146.  
  147. tcl++:
  148.     cd src;$(MAKE) -$(MAKEFLAGS) TCL++
  149.  
  150. #------------------------------------------------------------------------------
  151. #
  152. # Run the UCB and Extended Tcl tests.
  153.  
  154. test: ucbtests extdtests
  155.  
  156. ucbtests: all
  157.     @@echo ""
  158.     @@echo "**************************************************"
  159.     @@echo "* Ignore failures in tests:  expr-2.2 & expr-2.6 *"
  160.     @@echo "**************************************************"
  161.     @@echo ""
  162.     ./runtcl -c "cd $(TCL_UCB_DIR)/tests;source all"
  163.  
  164. extdtests: all
  165.     ./runtcl -c "cd tests;source all"    
  166.  
  167. #------------------------------------------------------------------------------
  168. # Install Tcl.
  169.  
  170. install: all
  171.     ./runtcl tclsrc/installTcl.tcl
  172.  
  173.  
  174. #------------------------------------------------------------------------------
  175. # Clean up the mess we made.
  176.  
  177. clean:
  178.     cd ucbsrc;    $(MAKE) -$(MAKEFLAGS) clean
  179.     cd osSupport; $(MAKE) -$(MAKEFLAGS) clean
  180.     cd src;       $(MAKE) -$(MAKEFLAGS) clean
  181.     cd tclsrc;    $(MAKE) -$(MAKEFLAGS) clean
  182.     cd tkucbsrc;  $(MAKE) -$(MAKEFLAGS) clean
  183.     cd tksrc;     $(MAKE) -$(MAKEFLAGS) clean
  184.     -rm -f libtcl.a TCLDEFAULT libtk.a runtcl runwish
  185. @
  186.